package org.zecontech.plantvszombie.init;

import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.sounds.SoundEvent;
import org.zecontech.plantvszombie.PlantVsZombieMod;
import org.zecontech.plantvszombie.util.Helpers;

public class ModSounds {

    public static final SoundEvent PLANT_HURT = registerSound("plant_hurt");
    public static final SoundEvent PLANT_DIE = registerSound("plant_die");

    public static SoundEvent registerSound(String name) {
        return Registry.register(BuiltInRegistries.SOUND_EVENT, Helpers.identifier( name),
                SoundEvent.createVariableRangeEvent(Helpers.identifier(name)));
    }

    public static void register() {
        PlantVsZombieMod.LOGGER.info("Registered sounds for " + PlantVsZombieMod.MOD_ID);
    }
}
